home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
SRDISK13.ARJ
/
SRDISK.DOC
< prev
next >
Wrap
Text File
|
1992-01-18
|
10KB
|
280 lines
ReSizeable RAMDisk version 1.30
for XMS memory only
Copyright (c) 1992 Marko Kohtala
Freeware
SRDISK is offered to you "AS IS" without any warranty. I do not require
any money for you using it, so I can not pay you any if you loose some
for using it. It is impossible for me to say this program will work on
every computer and DOS version you try to run in on - so don't rely on
it.
Previous versions of this software were in public domain. You may use
them freely for what ever purpose you want.
This version is NOT public domain. It's freeware; I grant you right to
run, copy and distribute this software as long as it is unmodified,
includes all the original files and you do not take any kind of payment
for distributing it.
If you want to use my code in your programs or modify it, contact me,
you'll have a change to get my permission, and make it legal.
CONTENTS
1. Publishing purpose, features included and recognised missing
2. Files in this release
3. Usage
3.1. Basic installation
3.2. Driver
3.3. SRDISK program
4. Technical data for further development
5. Troubleshooting
6. Last words
1. PUBLISHING PURPOSE, FEATURES INCLUDED AND RECOGNISED MISSING
This RAM disk driver is published in the hope we will get a really good
RAM disk that is free. I do not intend to make it all out myself but
rather hope there is out there someone who is willing to participate in
my work.
This RAM disk currently supports the following features:
* XMS (Extended memory on 286 and up with HIMEM or other XMS driver)
support - no other memory drivers - yet
NEW Device drivers may be chained to form larger disks using many
different kind memories.
* Resizeable/removable - destructive
NEW Supports 32-bit sector addressing introduced in DOS 4. Thus over 32M
RAM disks are possible. (Up to 63M disks tested.)
* Configurable
- sector size
- cluster size
- root directory entry count
- number of FATs
* Predefined DOS disk like formats
* Write protection
* Compatible with DOS versions from 2.00 to 5.x
(tested only with DOS 5.0 and 3.30)
* Stores last format time in volume label
NEW Can optionally set environment variables SRDISKn (n=1,2,...) to
the installed SRDISK drive letters.
What I would like to see added:
* Resizing of the disk without loosing disk contents
* EMS support
* UMB support
* Bank-Switch memory support ("The Last Byte" by Key Software)
* Low memory support
2. FILES IN THIS RELEASE
The following material is distributed in this release:
SRDISK.DOC this document
SRDISK.C disk formatter source code for Turbo C++ 1.0
SRDISK.ASM device driver source code for XMS
SRDISK.SYS compiled device driver
SRDISK.EXE compiled formatter program for the RAM disk
FILE_ID.DIZ short description of packet for BBS operators
3. USAGE
The SRDISK is basicly split in to two parts:
1) a device driver to add the virtual drive into DOS and
2) a program to control the device driver
The following explains the installation and how to use both of these
parts.
3.1. BASIC INSTALLATION
The basic installation can be done following the below steps:
1. Copy SRDISK.SYS into you root directory.
2. Copy SRDISK.EXE into some directory in your PATH
3. Add into your CONFIG.SYS line
DEVICE=SRDISK.SYS
4. Add into your AUTOEXEC.BAT after the PATH command line
SRDISK <size>
The <size> defines the disk size in Kbytes.
3.2. DRIVER
The driver can accept two parameters:
DEVICE=SRDISK.SYS [d:] [/A]
The [] around the parameter mean it is optional; you must not type the
brackets.
Both of the options are usually useless. They are ment for chaining
drivers to same virtual disk. Some use for them may be found, if drivers
for other memories are made. The RDISK.SYS in this release does not
support the chaining - it may be recompiled to support it though by
modifying equate CAPABLE in SRDISK.ASM.
The 'd:' is meant to force the RDISK.SYS into the specified drive. If
the specified drive is driven by another SRDISK device, this driver will
be appended into the other SRDISK device. If it is not driven by another
SRDISK device, the SRDISK will try to force DOS to give it the drive
letter. Though my DOS manual states this should be possible, I was not
able to make it work (with DOS 5.0), so the driver will later think it
is a different drive than DOS thinks it is.
/A switch is another, more preferable way to append the driver into a
previously installed driver. With it you need not worry about the drive
letter DOS has given to the previous driver. The appending means that
the devices will be chained into the same drive; different parts of the
virtual disk can then use different drivers and different kinds of
memory. All drivers may not allow other drivers to be appended to them.
If you see error messages, you may have forgotten to install the XMS
driver (eg. HIMEM.SYS) prior to the RDISK.SYS, or you have improper DOS
version or something. Try to fix the problem. If you fail... sorry.
Merely installing the driver gives you no RAM disk. It is as though you
had installed a floppy driver without putting a disk in the drive. For
that you need the SRDISK.EXE program.
3.3. SRDISK PROGRAM
The disk can be enabled by, for example, using command "SRDISK 1024"
which will make first SRDISK a 1024K disk. It can be disabled by making
it of size 0: "SRDISK 0".
You should include the command to enable the RAM disk into your
AUTOEXEC.BAT file.
The SRDISK is self documented. You'll get the documentation by typing at
the DOS prompt "SRDISK /?" and hitting enter.
4. TECHNICAL DATA FOR FURTHER DEVELOPMENT
The job is split between the device driver and the SRDISK program this
way:
Device driver does:
* What ever a RAM disk driver is expected by the DOS to do.
* Support multiplex interrupt server at AH=72h. Any program may
receive this way a pointer into a data structure that contains the
following data:
- BIOS parameter block for the drive.
- Disk size in K-bytes.
- Read/write access flags (read flag is actually enabled flag).
- Media byte.
- Flag to tell if the media has changed (set by SRDISK).
- Number of open files on drive.
- Pointer to the sector read/write function in the driver.
- Pointer to the memory allocation routine in the driver.
- Some information about what kind of memory can be used for the
disk.
- Pointers into next driver in the driver chain and into next
virtual SRDISK drive.
SRDISK.EXE does:
* Modify the drivers internal structures and call it's memory
allocation routine to change the size of allocated memory.
* Format the new disk i.e. write the boot sector, FAT(s) and root
directory according to the format sent to driver.
* Carries the responsibitity that the drivers structures and the disk
is OK.
I've done it this way because I did not want to bother myself adding the
SRDISK.EXE functions to the driver too. Some program was anyway needed
to control the driver.
The sources are somewhat documented. Also the used structures can be
found there - naturally.
Keep in mind, if you take advantage of this code, that the structures
are likely to change. Version 1.30 has still beta version of the
internal structures.
Also remember that there is a copyright on code. You'll though have good
chanse of getting license to develop a new driver using the SRDISK.ASM
as a base for your driver. Just contact me and tell me about it.
5. TROUBLESHOOTING
Causes of grief
1. RAM disks loose their contents when power is turned off! Do not store
anything valuable there.
2. There is no XMS memory without a proper device driver. HIMEM.SYS or
QEMM will do.
3. Not all HIMEM.SYS support memory above 16M limit. HIMEM.SYS that came
with MS-Windows 3.0 is reported be ok.
6. LAST WORDS
I HOPE you will send any modified versions, new drivers, better
documentation, bug reports, suggestions and your love (preferably
female) to me. If I can, I'll then add them to the next release of
SRDISK.
I'd like the modifications to sources as patches to some version the
number of which you should tell.
I'll make a list of every people contributing material to this product
and ship it with further releases. If modesty is one of your virtues, I
can leave you out of the list.
If you do not contribute anything into this driver and I get the drive
to not loose it's contents when size is changed, I'll probably change
into shareware. If I spend my time making this thing, I'll need the
money (as a student, I need it anyway :) ). I do not mind getting money
already at the below address; ALL support is appreciated.
You can contact me by sending E-mail from
Internet, Bitnet etc. to 'Marko.Kohtala@hut.fi'
CompuServe to '>INTERNET:Marko.Kohtala@hut.fi'
or by traditional mail to
Marko Kohtala
PL 115
SF-01451 Vantaa
FINLAND
or by calling Airline QBBS, 24H, HST, V.32, V.42, MNP, +358-0-8725380
and leaving mail to me, Marko Kohtala.